Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughDefault Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the default configuration for the commit-msg hook’s LLM enrichment timeout to reduce unintended fallbacks to heuristic analysis during slower LLM responses.
Changes:
- Increased the default
enrichTimeoutforhooks.commitMsgfrom 5000ms to 15000ms.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| defaultLifecycle: 'project', | ||
| enrich: true, | ||
| enrichTimeout: 5000, | ||
| enrichTimeout: 15000, |
There was a problem hiding this comment.
enrichTimeout default was updated to 15000ms here, but the inline documentation in src/domain/interfaces/IHookConfig.ts still says "Default: 5000." Please update that comment (and any other user-facing config docs) to match the new default to avoid confusion.
| enrichTimeout: 15000, | |
| enrichTimeout: 15000, // Default: 15000 ms |
There was a problem hiding this comment.
This has been addressed - I amended the commit to change the value from 15s to 8s, which is safely under the 10s hook hard timeout. The current default is now 8000ms.
There was a problem hiding this comment.
Fixed - updated the documentation comment in IHookConfig.ts to say 'Default: 8000. Must be under hook timeout (10s).'
The commit-msg hook was falling back to heuristic analysis because the LLM API calls were timing out at the 5 second default. Anthropic API calls typically take 2-5 seconds but can take longer during high load. Increased to 8 seconds (not higher) because the hook itself has a 10 second hard timeout via setupShutdown() - must leave buffer for the rest of the hook processing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-5-20251101 AI-Decision: the LLM API calls were timing out at the 5 second default AI-Confidence: medium AI-Tags: hooks, utils, pattern:because-clause AI-Lifecycle: project AI-Memory-Id: 6c4a23e2 AI-Source: heuristic
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/hooks/utils/config.ts`:
- Line 54: The default commitMsg.enrichTimeout (currently 15000) exceeds the
hook runner hard shutdown (~10000ms), so clamp the default to the hard limit:
change the commitMsg.enrichTimeout default to use the shutdown constant (or
Math.min(15000, HOOK_SHUTDOWN_MS / 1000 where units apply) so it never exceeds
the value used in setupShutdown()), or alternatively set the hard timeout
variable used by setupShutdown() to >=15000 if you intend a longer real limit;
also add a brief comment next to commitMsg.enrichTimeout explaining the cap to
avoid misleading configuration.
AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-5-20251101 AI-Decision: The default enrichTimeout for LLM enrichment calls was changed from 5000ms to 8000ms, and there's a constraint that it must be under the hook timeout of 10 seconds. AI-Confidence: verified AI-Tags: ihookconfig, timeout, llm-enrichment, configuration, hook-constraints AI-Lifecycle: project AI-Memory-Id: 7f8d8075 AI-Source: llm-enrichment
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
enrichTimeoutfrom 5000ms to 8000ms for the commit-msg hooksetupShutdown(10_000))Root Cause
Recent commits (6d1e0c0, b233c4a, a65346f, 69358ca) had
AI-Source: heuristicinstead ofllm-enrichmentbecause the LLM API was timing out before returning results.Test Plan
Closes GIT-95
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation